package net.sppan.blog.job;

import java.util.Timer;
import java.util.TimerTask;

import net.sppan.blog.store.DeductionStore;

import com.jfinal.log.Log;

public class ReloadDeductionJob {
	private static final Log log = Log.getLog(ReloadDeductionJob.class);

	public static void monitor() {
		Timer timer = new Timer();
		timer.schedule(new ReloadDeductionJob().new ReloadTask(), 60000, 60000 * 2);

	}

	class ReloadTask extends TimerTask {

		@Override
		public void run() {
			try {
				log.error("reload deduction start...");
				DeductionStore.instance.init();
				log.error("reload deduction end");
			} catch (Exception e) {

			}

		}

	}
}
